﻿using System.Linq;
using Company.Merchandising.BusinessLayer.DataEntities;

namespace Company.Merchandising.DataAccessLayer.DataAccessCommon
{
	public class DACCredential : DACBase
	{
		public DACCredential(MerchModelEntities modelEntities) : base(modelEntities) { }

		public Credential GetCredentialByLoginName(string loginName)
		{
			return (from cred in _modelEntities.Credential where cred.Login == loginName && !cred.IsDeleted select cred).FirstOrDefault();
		}
	}
}
